import request from '@/utils/request'

// 查询维修结算列表
export function listSettlement(query) {
  return request({
    url: '/system/settlement/list',
    method: 'get',
    params: query
  })
}

// 查询维修结算详细
export function getSettlement(maintenanceSettlementId) {
  return request({
    url: '/system/settlement/' + maintenanceSettlementId,
    method: 'get'
  })
}

// 新增维修结算
export function addSettlement(data) {
  return request({
    url: '/system/settlement',
    method: 'post',
    data: data
  })
}

// 修改维修结算
export function updateSettlement(data) {
  return request({
    url: '/system/settlement',
    method: 'put',
    data: data
  })
}

// 删除维修结算
export function delSettlement(maintenanceSettlementId) {
  return request({
    url: '/system/settlement/' + maintenanceSettlementId,
    method: 'delete'
  })
}

// 导出维修结算
export function exportSettlement(query) {
  return request({
    url: '/system/settlement/export',
    method: 'get',
    params: query
  })
}